$(document).ready(
    function() { 
	$(".reload").click(
	    function () {
		$.post("/control", {"type": "", "name": "", "command": "reload"});
		showStatusMessage("reloading folders");
		return false;
	    }); 

	$(".update-internet-info").click(
	    function () {
		$.post("/control", {"type": "", "name": $(this).attr('href'), "command": "update-internet-info"});
		showStatusMessage("updating movie information");
		return false;
	    }); 

	$(".movie-link").click(
	    function () {
		$.post("/control", {"type": "", "name": $(this).attr('href').substr(8), "command": "play-movie"});
		showStatusMessage("starting playback");
		return false;
	    }); 

	$(".dvd-link").click(
	    function () {
		$.post("/control", {"type": "", "name": "", "command": "play-dvd"});
		showStatusMessage("starting playback");
		return false;
	    }); 
    });
